import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:smart_devices/bruno/src/components/rating/brn_rating_star.dart';
import 'package:smart_devices/bruno/src/components/step/brn_step_line.dart';
import 'package:smart_devices/bruno/src/components/tabbar/normal/brn_tab_bar.dart';
import 'package:smart_devices/bruno/src/components/text/brn_expandable_text.dart';
import 'package:smart_devices/icons/src/antd_icons.dart';
import 'package:smart_devices/routes/index.dart';
import 'package:smart_devices/ui/draw_under_line.dart';
import 'package:smart_devices/ui/image_overlay.dart';
import 'package:smart_devices/ui/max_line_wrap.dart';
import 'package:smart_devices/ui/step_line.dart';
import 'package:smart_devices/utils/colors.dart';
import 'package:smart_devices/utils/styles.dart';
import 'package:smart_devices/utils/tools.dart';
import 'package:smart_devices/views/device/maintain/info/info_view.dart';

import 'details_logic.dart';

class RepairDetailsView extends GetView<RepairDetailsLogic> {
  const RepairDetailsView({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Obx(() => DefaultTabController(
        length: controller.tabs.length,
        child: Scaffold(
          appBar: AppBar(
            leading: IconButton(
                icon: const Icon(
                  Icons.arrow_back_ios,
                  color: Colors.white,
                  size: 15,
                ),
                onPressed: Get.back),
            automaticallyImplyLeading: false,
            title: Text(
              '报修详情',
              style: StylesUtils.customTextStyle(
                  fontSize: 18, fontWeight: FontWeight.w700),
            ),
            centerTitle: true,
          ),
          body: NestedScrollView(
            headerSliverBuilder:
                (BuildContext context, bool innerBoxIsScrolled) {
              return buildHeadWidget(context);
            },
            body: TabBarView(
              controller: controller.tabController,
              children: getBarView(),
            ),
          ),
        )));
  }

  List<Widget> buildHeadWidget(BuildContext context) {
    return [
      SliverToBoxAdapter(
        child: DrawUnderLine(
          child: Container(
            decoration: const BoxDecoration(color: Colors.white),
            margin: const EdgeInsets.only(bottom: 10),
            child: Column(
              children: [
                Row(
                  children: [
                    Container(
                      width: 140,
                      height: 140,
                      alignment: Alignment.center,
                      child: Container(
                        width: 120,
                        height: 120,
                        decoration: BoxDecoration(
                          borderRadius: BorderRadius.circular(5),
                          color: ColorsUtils.parseColorFromHexString(
                              ColorsUtils.color669e),
                        ),
                        child: ToolsUtils.assetImageSvg('u4201.svg',
                            width: 46, height: 58),
                      ),
                    ),
                    Expanded(
                        child: Container(
                      padding: const EdgeInsets.symmetric(vertical: 10),
                      child: Column(
                        children: [
                          Container(
                            height: 40,
                            alignment: Alignment.centerLeft,
                            child: Text(
                              controller.details.value.name,
                              style: StylesUtils.customTextStyle(
                                  fontSize: 18,
                                  fontWeight: FontWeight.w700,
                                  color: ColorsUtils.color1c24),
                            ),
                          ),
                          Container(
                            height: 30,
                            alignment: Alignment.centerLeft,
                            child: Wrap(
                              spacing: 5,
                              children: [
                                Text(
                                  '设备编号：',
                                  style: StylesUtils.customTextStyle(
                                      color: ColorsUtils.color3333),
                                ),
                                Text(
                                  controller.details.value.code,
                                  style: StylesUtils.customTextStyle(
                                      color: ColorsUtils.colorAaaa),
                                )
                              ],
                            ),
                          ),
                          Container(
                            height: 30,
                            alignment: Alignment.centerLeft,
                            child: Wrap(
                              spacing: 5,
                              children: [
                                Text(
                                  '规格型号：',
                                  style: StylesUtils.customTextStyle(
                                      color: ColorsUtils.color3333),
                                ),
                                Text(
                                  controller.details.value.model,
                                  style: StylesUtils.customTextStyle(
                                      color: ColorsUtils.colorAaaa),
                                )
                              ],
                            ),
                          ),
                          Container(
                            height: 30,
                            alignment: Alignment.centerLeft,
                            child: Wrap(
                              spacing: 5,
                              children: [
                                Text(
                                  '设备类型：',
                                  style: StylesUtils.customTextStyle(
                                      color: ColorsUtils.color3333),
                                ),
                                Text(
                                  controller.details.value.code,
                                  style: StylesUtils.customTextStyle(
                                      color: ColorsUtils.colorAaaa),
                                )
                              ],
                            ),
                          )
                        ],
                      ),
                    ))
                  ],
                ),
                Container(
                  height: 30,
                  padding: const EdgeInsets.only(left: 20),
                  alignment: Alignment.centerLeft,
                  child: Wrap(
                    spacing: 5,
                    children: [
                      Text(
                        '使用部门：',
                        style: StylesUtils.customTextStyle(
                            color: ColorsUtils.color3333),
                      ),
                      Text(
                        '生产部门',
                        style: StylesUtils.customTextStyle(
                            color: ColorsUtils.colorAaaa),
                      )
                    ],
                  ),
                ),
                Container(
                  height: 30,
                  padding: const EdgeInsets.only(left: 20),
                  alignment: Alignment.centerLeft,
                  child: Wrap(
                    spacing: 5,
                    children: [
                      Text(
                        '存放位置：',
                        style: StylesUtils.customTextStyle(
                            color: ColorsUtils.color3333),
                      ),
                      Text(
                        '新产品N205生产车间二层一车间',
                        maxLines: 1,
                        overflow: TextOverflow.ellipsis,
                        style: StylesUtils.customTextStyle(
                            color: ColorsUtils.colorAaaa),
                      )
                    ],
                  ),
                ),
              ],
            ),
          ),
        ),
      ),
      SliverPersistentHeader(
        pinned: true,
        delegate: CommonSilverAppBarDelegate(
            Container(
                decoration: BoxDecoration(
                    color: Colors.white,
                    border: Border(
                        bottom: BorderSide(
                            color: ColorsUtils.rgba(235, 235, 235, 1)))),
                child: BrnTabBar(
                  tabs: controller.tabs,
                  controller: controller.tabController,
                  isScroll: true,
                  tabWidth: 80,
                  tagHeight: 50,
                  tagSpacing: 10,
                  labelStyle:
                      StylesUtils.customTextStyle(color: ColorsUtils.color0052),
                  labelColor: ColorsUtils.parseColorFromHexString(
                      ColorsUtils.color0052),
                  unselectedLabelStyle:
                      StylesUtils.customTextStyle(color: ColorsUtils.color3333),
                  unselectedLabelColor: ColorsUtils.parseColorFromHexString(
                      ColorsUtils.color3333),
                  indicatorColor: ColorsUtils.parseColorFromHexString(
                      ColorsUtils.color0052),
                  indicatorWeight: 3,
                  indicatorWidth: 30,
                )),
            height: 50),
      ),
    ];
  }

  List<Widget> getBarView() {
    return [
      CustomScrollView(
        slivers: [
          SliverList.list(children: [
            Container(
              margin: const EdgeInsets.only(top: 10),
              color: Colors.white,
              child: ListBody(
                children: [
                  SizedBox(
                    height: 40,
                    child: CustomPaint(
                        painter: _MyCustomPaintLine(),
                        child: Container(
                          margin: const EdgeInsets.only(left: 30),
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '报修信息',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color6666),
                          ),
                        )),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '报修单号',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              'BX-20224648',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '报修主题',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '设备一报修0025',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '报修人',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '张凤敏',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '所属部门',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '生产部',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '联系方式',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '18245681068',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                ],
              ),
            ),
            Container(
              margin: const EdgeInsets.only(top: 10),
              color: Colors.white,
              child: ListBody(
                children: [
                  SizedBox(
                    height: 40,
                    child: CustomPaint(
                        painter: _MyCustomPaintLine(),
                        child: Container(
                          margin: const EdgeInsets.only(left: 30),
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '故障信息',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color6666),
                          ),
                        )),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '故障时间',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '2023年10月20日 22:46',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '故障等级',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '紧急',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '故障类型',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '类型一',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '是否停机',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '是',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '故障描述',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                      ],
                    ),
                  ),
                  Container(
                    padding: const EdgeInsets.only(left: 30),
                    child: BrnExpandableText(
                      maxLines: 2,
                      text:
                          '突降天雷，咱家的矿，被炸了！什么？咱家的矿被炸了！谁家矿炸了？炸了！七小姐，咱家的矿，被天雷给炸了！咱家的矿被炸了！',
                      textStyle: StylesUtils.customTextStyle(
                          color: ColorsUtils.colorAaaa),
                    ),
                  )
                ],
              ),
            ),
            Container(
              margin: const EdgeInsets.only(top: 10),
              color: Colors.white,
              child: ListBody(
                children: [
                  SizedBox(
                    height: 40,
                    child: CustomPaint(
                        painter: _MyCustomPaintLine(),
                        child: Container(
                          margin: const EdgeInsets.only(left: 30),
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '故障图片',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color6666),
                          ),
                        )),
                  ),
                  Container(
                    padding: const EdgeInsets.all(10),
                    alignment: Alignment.centerLeft,
                    child: MaxLineWrap(
                        spacing: 10,
                        runSpacing: 10,
                        itemAlignment: MaxLineWrapAlignment.start,
                        children: controller.imgs
                            .map((String url) => ImageOverlay(
                                  width: 50,
                                  height: 50,
                                  image: NetworkImage(url),
                                ))
                            .toList()),
                  ),
                ],
              ),
            ),
            Container(
              margin: const EdgeInsets.only(top: 10),
              color: Colors.white,
              child: ListBody(
                children: [
                  SizedBox(
                    height: 40,
                    child: CustomPaint(
                        painter: _MyCustomPaintLine(),
                        child: Container(
                          margin: const EdgeInsets.only(left: 30),
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '关联文档',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color6666),
                          ),
                        )),
                  ),
                  ...controller.files
                      .map((element) => Container(
                          height: 40,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.symmetric(horizontal: 10),
                          child: Row(
                            children: [
                              Container(
                                width: 40,
                                alignment: Alignment.center,
                                margin: const EdgeInsets.only(right: 10),
                                child: Image(
                                  width: 25,
                                  height: 25,
                                  image: ToolsUtils.getFileIconByFilename(
                                      element.name),
                                ),
                              ),
                              Align(
                                alignment: Alignment.centerLeft,
                                child: Text(
                                  element.name,
                                  overflow: TextOverflow.ellipsis,
                                  style: StylesUtils.customTextStyle(
                                      color: ColorsUtils.color0052),
                                ),
                              )
                            ],
                          )))
                      .toList(),
                ],
              ),
            )
          ])
        ],
      ),
      CustomScrollView(
        slivers: [
          SliverList.list(children: [
            Container(
              margin: const EdgeInsets.only(top: 10),
              color: Colors.white,
              child: Column(
                children: [
                  SizedBox(
                    height: 40,
                    child: CustomPaint(
                        painter: _MyCustomPaintLine(),
                        child: Container(
                          margin: const EdgeInsets.only(left: 30),
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '审核信息',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color6666),
                          ),
                        )),
                  ),
                  ...steps()
                ],
              ),
            )
          ])
        ],
      ),
      CustomScrollView(
        slivers: [
          SliverList.list(children: [
            Container(
              padding: const EdgeInsets.symmetric(vertical: 20),
              margin: const EdgeInsets.only(top: 10),
              color: Colors.white,
              child: Column(
                children: [
                  BrnStepLine(
                    lineColor: ColorsUtils.parseColorFromHexString(
                        ColorsUtils.color0052),
                    lineWidth: 1,
                    contentWidget: ListBody(
                      children: [
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '报修申请',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333, fontSize: 15),
                          ),
                        ),
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Row(
                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
                            children: [
                              Text(
                                '部门一',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.colorAaaa),
                              ),
                              Text(
                                '2023.10.14 12:44:08',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.colorAaaa, fontSize: 13),
                              ),
                            ],
                          ),
                        ),
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '沈华',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.colorAaaa),
                          ),
                        )
                      ],
                    ),
                  ),
                  BrnStepLine(
                    lineColor: ColorsUtils.parseColorFromHexString(
                        ColorsUtils.color0052),
                    lineWidth: 1,
                    contentWidget: ListBody(
                      children: [
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '通过审核',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333, fontSize: 15),
                          ),
                        ),
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Row(
                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
                            children: [
                              Text(
                                '部门一',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.colorAaaa),
                              ),
                              Text(
                                '2023.10.14 12:44:08',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.colorAaaa, fontSize: 13),
                              ),
                            ],
                          ),
                        ),
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '王晓琳',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.colorAaaa),
                          ),
                        )
                      ],
                    ),
                  ),
                  BrnStepLine(
                    lineColor: ColorsUtils.parseColorFromHexString(
                        ColorsUtils.color0052),
                    lineWidth: 1,
                    contentWidget: ListBody(
                      children: [
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '派工',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333, fontSize: 15),
                          ),
                        ),
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Row(
                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
                            children: [
                              Text(
                                '部门一',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.colorAaaa),
                              ),
                              Text(
                                '2023.10.14 12:44:08',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.colorAaaa, fontSize: 13),
                              ),
                            ],
                          ),
                        ),
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '陈明',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.colorAaaa),
                          ),
                        )
                      ],
                    ),
                  ),
                  BrnStepLine(
                    lineColor: ColorsUtils.parseColorFromHexString(
                        ColorsUtils.color0052),
                    lineWidth: 1,
                    contentWidget: ListBody(
                      children: [
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '接单',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333, fontSize: 15),
                          ),
                        ),
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Row(
                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
                            children: [
                              Text(
                                '维修班组三',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.colorAaaa),
                              ),
                              Text(
                                '2023.10.14 12:44:08',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.colorAaaa, fontSize: 13),
                              ),
                            ],
                          ),
                        ),
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '李红',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.colorAaaa),
                          ),
                        )
                      ],
                    ),
                  ),
                  BrnStepLine(
                    lineColor: ColorsUtils.parseColorFromHexString(
                        ColorsUtils.color0052),
                    lineWidth: 1,
                    contentWidget: ListBody(
                      children: [
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '开始维修',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333, fontSize: 15),
                          ),
                        ),
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Row(
                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
                            children: [
                              Text(
                                '部门一',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.colorAaaa),
                              ),
                              Text(
                                '2023.10.14 12:44:08',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.colorAaaa, fontSize: 13),
                              ),
                            ],
                          ),
                        ),
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '沈华',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.colorAaaa),
                          ),
                        )
                      ],
                    ),
                  ),
                  BrnStepLine(
                    lineColor: ColorsUtils.parseColorFromHexString(
                        ColorsUtils.color0052),
                    lineWidth: 1,
                    contentWidget: ListBody(
                      children: [
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '执行维修',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333, fontSize: 15),
                          ),
                        ),
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Row(
                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
                            children: [
                              Text(
                                '部门一',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.colorAaaa),
                              ),
                              Text(
                                '2023.10.14 12:44:08',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.colorAaaa, fontSize: 13),
                              ),
                            ],
                          ),
                        ),
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '张康',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.colorAaaa),
                          ),
                        )
                      ],
                    ),
                  ),
                  BrnStepLine(
                    lineColor: ColorsUtils.parseColorFromHexString(
                        ColorsUtils.color0052),
                    lineWidth: 1,
                    contentWidget: ListBody(
                      children: [
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '暂停维修',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333, fontSize: 15),
                          ),
                        ),
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Row(
                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
                            children: [
                              Text(
                                '部门一',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.colorAaaa),
                              ),
                              Text(
                                '2023.10.14 12:44:08',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.colorAaaa, fontSize: 13),
                              ),
                            ],
                          ),
                        ),
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '赵晓霞',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.colorAaaa),
                          ),
                        )
                      ],
                    ),
                  ),
                  BrnStepLine(
                    lineColor: ColorsUtils.parseColorFromHexString(
                        ColorsUtils.color0052),
                    lineWidth: 1,
                    contentWidget: ListBody(
                      children: [
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '继续维修',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333, fontSize: 15),
                          ),
                        ),
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Row(
                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
                            children: [
                              Text(
                                '部门一',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.colorAaaa),
                              ),
                              Text(
                                '2023.10.14 12:44:08',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.colorAaaa, fontSize: 13),
                              ),
                            ],
                          ),
                        ),
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '唐琳',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.colorAaaa),
                          ),
                        )
                      ],
                    ),
                  ),
                  BrnStepLine(
                    lineColor: ColorsUtils.parseColorFromHexString(
                        ColorsUtils.color0052),
                    lineWidth: 1,
                    contentWidget: ListBody(
                      children: [
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '完成维修',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333, fontSize: 15),
                          ),
                        ),
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Row(
                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
                            children: [
                              Text(
                                '部门一',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.colorAaaa),
                              ),
                              Text(
                                '2023.10.14 12:44:08',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.colorAaaa, fontSize: 13),
                              ),
                            ],
                          ),
                        ),
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '张康',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.colorAaaa),
                          ),
                        )
                      ],
                    ),
                  ),
                  BrnStepLine(
                    lineColor: ColorsUtils.parseColorFromHexString(
                        ColorsUtils.color0052),
                    lineWidth: 1,
                    contentWidget: ListBody(
                      children: [
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '验证',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333, fontSize: 15),
                          ),
                        ),
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Row(
                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
                            children: [
                              Text(
                                '部门一',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.colorAaaa),
                              ),
                              Text(
                                '2023.10.14 12:44:08',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.colorAaaa, fontSize: 13),
                              ),
                            ],
                          ),
                        ),
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '张康',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.colorAaaa),
                          ),
                        ),
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '是否通过：是',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.colorAaaa),
                          ),
                        ),
                        Container(
                            height: 30,
                            alignment: Alignment.centerLeft,
                            child: Row(
                              children: [
                                Text(
                                  '维修评分：',
                                  style: StylesUtils.customTextStyle(
                                      color: ColorsUtils.colorAaaa),
                                ),
                                const BrnRatingStar(
                                  selectedCount: 3,
                                )
                              ],
                            )),
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '维修评价：喝牛奶不',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.colorAaaa),
                          ),
                        ),
                      ],
                    ),
                  ),
                  BrnStepLine(
                    lineColor: Colors.transparent,
                    lineWidth: 1,
                    contentWidget: ListBody(
                      children: [
                        Container(
                          height: 30,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '已维修',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333, fontSize: 15),
                          ),
                        ),
                      ],
                    ),
                  ),
                ],
              ),
            )
          ])
        ],
      ),
      CustomScrollView(
        slivers: [
          SliverList.list(children: [
            Container(
              margin: const EdgeInsets.only(top: 10),
              color: Colors.white,
              child: ListBody(
                children: [
                  SizedBox(
                    height: 40,
                    child: CustomPaint(
                        painter: _MyCustomPaintLine(),
                        child: Container(
                          margin: const EdgeInsets.only(left: 30),
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '维修工单',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color6666),
                          ),
                        )),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '工单单号',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              'WXDH2051351',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '工单主题',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '设备一维修2554',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '工单类型',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '报修工单',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '派单人员',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '王晓霞',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '维修班组',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '维修班组一',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '负责人',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '唐晓霞',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '其他维修人员',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '香蕉，子瑞，林奇，张柳',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                ],
              ),
            ),
            Container(
              margin: const EdgeInsets.only(top: 10),
              color: Colors.white,
              child: ListBody(
                children: [
                  SizedBox(
                    height: 40,
                    child: CustomPaint(
                        painter: _MyCustomPaintLine(),
                        child: Container(
                          margin: const EdgeInsets.only(left: 30),
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '处理情况',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color6666),
                          ),
                        )),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '故障原因',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '机械故障',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '维修级别',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '大修',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '维修类型',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '常见故障维修',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '紧急程度',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '高',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '开始时间',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '2022-05-17 09:57',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '结束时间',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '2022-05-17 12:57',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '维修费用',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '200.00',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '维修用时',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '1小时30分',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '工作描述',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                      ],
                    ),
                  ),
                  Container(
                    padding: const EdgeInsets.only(left: 30),
                    child: BrnExpandableText(
                      maxLines: 2,
                      text:
                          '突降天雷，咱家的矿，被炸了！什么？咱家的矿被炸了！谁家矿炸了？炸了！七小姐，咱家的矿，被天雷给炸了！咱家的矿被炸了！',
                      textStyle: StylesUtils.customTextStyle(
                          color: ColorsUtils.colorAaaa),
                    ),
                  )
                ],
              ),
            ),
            Container(
              margin: const EdgeInsets.only(top: 10),
              color: Colors.white,
              child: ListBody(
                children: [
                  SizedBox(
                    height: 40,
                    child: CustomPaint(
                        painter: _MyCustomPaintLine(),
                        child: Container(
                          margin: const EdgeInsets.only(left: 30),
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '维修图片',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color6666),
                          ),
                        )),
                  ),
                  Container(
                    padding: const EdgeInsets.all(10),
                    alignment: Alignment.centerLeft,
                    child: MaxLineWrap(
                        spacing: 10,
                        runSpacing: 10,
                        itemAlignment: MaxLineWrapAlignment.start,
                        children: controller.imgs
                            .map((String url) =>
                                ToolsUtils.urlImg(url, width: 50, height: 50))
                            .toList()),
                  ),
                ],
              ),
            ),
            Container(
              margin: const EdgeInsets.only(top: 10),
              color: Colors.white,
              child: ListBody(
                children: [
                  SizedBox(
                    height: 40,
                    child: CustomPaint(
                        painter: _MyCustomPaintLine(),
                        child: Container(
                          margin: const EdgeInsets.only(left: 30),
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '关联文档',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color6666),
                          ),
                        )),
                  ),
                  ...controller.files
                      .map((element) => Container(
                          height: 40,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.symmetric(horizontal: 10),
                          child: Row(
                            children: [
                              Container(
                                width: 40,
                                alignment: Alignment.center,
                                margin: const EdgeInsets.only(right: 10),
                                child: Image(
                                  width: 25,
                                  height: 25,
                                  image: ToolsUtils.getFileIconByFilename(
                                      element.name),
                                ),
                              ),
                              Align(
                                alignment: Alignment.centerLeft,
                                child: Text(
                                  element.name,
                                  overflow: TextOverflow.ellipsis,
                                  style: StylesUtils.customTextStyle(
                                      color: ColorsUtils.color0052),
                                ),
                              )
                            ],
                          )))
                      .toList(),
                ],
              ),
            )
          ])
        ],
      ),
      Row(
        mainAxisAlignment: MainAxisAlignment.start,
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Expanded(flex: 1, child: leftContainer()),
          Expanded(flex: 3, child: rightContainer())
        ],
      ),
      CustomScrollView(
        slivers: [
          SliverList.list(children: [
            Container(
              margin: const EdgeInsets.only(top: 10),
              color: Colors.white,
              child: ListBody(
                children: [
                  SizedBox(
                    height: 40,
                    child: CustomPaint(
                        painter: _MyCustomPaintLine(),
                        child: Container(
                          margin: const EdgeInsets.only(left: 30),
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '更换备件',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color6666),
                          ),
                        )),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '是否更换',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '是',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '领用单号',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              'LY2022645',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '领用主题',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '备件领用申请202224',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '申请时间',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '2023-10-17',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '领用原因',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '失灵',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '仓库名称',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '仓库一',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 30),
                          child: Text(
                            '申请备件',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color3333),
                          ),
                        ),
                        Expanded(
                          child: Container(
                            padding: const EdgeInsets.only(left: 10),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '3种备件，总数量6',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color9999),
                            ),
                          ),
                        ),
                        InkWell(
                          onTap: () {
                            Get.toNamed(Routes.deviceSpareParticulars);
                          },
                          child: Container(
                            width: 50,
                            alignment: Alignment.center,
                            child: Icon(
                              AntdIcons.right,
                              color: ColorsUtils.parseColorFromHexString(
                                  ColorsUtils.color9999),
                              size: 15,
                            ),
                          ),
                        )
                      ],
                    ),
                  ),
                ],
              ),
            )
          ])
        ],
      )
    ];
  }

  Widget leftContainer() {
    return Container(
        padding: const EdgeInsets.only(top: 10),
        decoration: const BoxDecoration(color: Colors.white),
        child: Column(
          children: controller.users
              .asMap()
              .map((index, value) => MapEntry(
                  index,
                  Container(
                      height: 40,
                      alignment: Alignment.center,
                      decoration: BoxDecoration(
                          border: Border(
                              right: BorderSide(
                                  width: index == controller.userIndex.value
                                      ? 2
                                      : 0,
                                  color: index == controller.userIndex.value
                                      ? ColorsUtils.parseColorFromHexString(
                                          ColorsUtils.color1677)
                                      : Colors.transparent))),
                      child: InkWell(
                        onTap: () {
                          controller.userIndex.value = index;
                          controller.onTabChange(index);
                        },
                        child: Obx(() => Text(
                              controller.users[index],
                              style: StylesUtils.customTextStyle(
                                  color: index == controller.userIndex.value
                                      ? ColorsUtils.color1677
                                      : ColorsUtils.color9999,
                                  fontWeight:
                                      index == controller.userIndex.value
                                          ? FontWeight.bold
                                          : FontWeight.normal),
                            )),
                      ))))
              .values
              .toList(),
        ));
  }

  Widget rightContainer() {
    return ListView(
        padding: const EdgeInsets.all(10),
        controller: controller.scrollController,
        children: controller.users
            .asMap()
            .map((index, value) => MapEntry(index, boxAdapter(index, value)))
            .values
            .toList());
  }

  Widget boxAdapter(int index, String userName) {
    return Column(
      key: controller.tabKeys[index],
      children: [
        Container(
          height: 70,
          margin: const EdgeInsets.only(bottom: 10),
          padding: const EdgeInsets.symmetric(horizontal: 10),
          decoration: BoxDecoration(
              color: Colors.white, borderRadius: BorderRadius.circular(5)),
          child: Column(
            children: [
              Container(
                height: 35,
                alignment: Alignment.centerLeft,
                child: Text(
                  controller.users[index],
                  style: StylesUtils.customTextStyle(
                      fontWeight: FontWeight.w700,
                      fontSize: 15,
                      color: ColorsUtils.color6666),
                ),
              ),
              SizedBox(
                height: 35,
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Text(
                      '维修负责人',
                      style: StylesUtils.customTextStyle(
                          color: ColorsUtils.color9999, fontSize: 13),
                    ),
                    Text(
                      '维修总用时：1小时30分钟',
                      style: StylesUtils.customTextStyle(
                          color: ColorsUtils.color9999, fontSize: 13),
                    )
                  ],
                ),
              )
            ],
          ),
        ),
        Container(
          height: 180,
          margin: const EdgeInsets.only(bottom: 10),
          padding: const EdgeInsets.symmetric(horizontal: 10),
          decoration: BoxDecoration(
              color: Colors.white, borderRadius: BorderRadius.circular(5)),
          child: Column(
            children: [
              Container(
                height: 28,
                alignment: Alignment.centerLeft,
                child: Wrap(
                  spacing: 15,
                  children: [
                    Text(
                      '开始时间',
                      style: StylesUtils.customTextStyle(
                          color: ColorsUtils.color3333, fontSize: 13),
                    ),
                    Text(
                      '2022-07-19 17:00:00',
                      style: StylesUtils.customTextStyle(
                          color: ColorsUtils.colorAaaa, fontSize: 13),
                    ),
                  ],
                ),
              ),
              Container(
                height: 28,
                alignment: Alignment.centerLeft,
                child: Wrap(
                  spacing: 15,
                  children: [
                    Text(
                      '结束时间',
                      style: StylesUtils.customTextStyle(
                          color: ColorsUtils.color3333, fontSize: 13),
                    ),
                    Text(
                      '2022-07-19 17:00:00',
                      style: StylesUtils.customTextStyle(
                          color: ColorsUtils.colorAaaa, fontSize: 13),
                    ),
                  ],
                ),
              ),
              Container(
                height: 28,
                alignment: Alignment.centerLeft,
                child: Wrap(
                  spacing: 15,
                  children: [
                    Text(
                      '维修用时',
                      style: StylesUtils.customTextStyle(
                          color: ColorsUtils.color3333, fontSize: 13),
                    ),
                    Text(
                      '1小时30分钟',
                      style: StylesUtils.customTextStyle(
                          color: ColorsUtils.colorAaaa, fontSize: 13),
                    ),
                  ],
                ),
              ),
              Container(
                alignment: Alignment.centerLeft,
                child: MaxLineWrap(
                  spacing: 15,
                  maxLine: 2,
                  children: [
                    Text(
                      '维修内容',
                      style: StylesUtils.customTextStyle(
                          color: ColorsUtils.color3333, fontSize: 13),
                    ),
                    Text(
                      '马上就是有钱人了还伺候什么甲方，马上就是有钱人了还伺候什么甲方',
                      style: StylesUtils.customTextStyle(
                          color: ColorsUtils.colorAaaa, fontSize: 13),
                    )
                  ],
                ),
              ),
              Container(
                height: 28,
                alignment: Alignment.centerLeft,
                child: Wrap(
                  spacing: 15,
                  children: [
                    Text(
                      '暂停原因',
                      style: StylesUtils.customTextStyle(
                          color: ColorsUtils.color3333, fontSize: 13),
                    ),
                    Text(
                      '取备件',
                      style: StylesUtils.customTextStyle(
                          color: ColorsUtils.colorAaaa, fontSize: 13),
                    ),
                  ],
                ),
              ),
            ],
          ),
        ),
        Container(
          height: 150,
          margin: const EdgeInsets.only(bottom: 10),
          padding: const EdgeInsets.symmetric(horizontal: 10),
          decoration: BoxDecoration(
              color: Colors.white, borderRadius: BorderRadius.circular(5)),
          child: Column(
            children: [
              Container(
                height: 28,
                alignment: Alignment.centerLeft,
                child: Wrap(
                  spacing: 15,
                  children: [
                    Text(
                      '开始时间',
                      style: StylesUtils.customTextStyle(
                          color: ColorsUtils.color3333, fontSize: 13),
                    ),
                    Text(
                      '2022-07-19 17:00:00',
                      style: StylesUtils.customTextStyle(
                          color: ColorsUtils.colorAaaa, fontSize: 13),
                    ),
                  ],
                ),
              ),
              Container(
                height: 28,
                alignment: Alignment.centerLeft,
                child: Wrap(
                  spacing: 15,
                  children: [
                    Text(
                      '结束时间',
                      style: StylesUtils.customTextStyle(
                          color: ColorsUtils.color3333, fontSize: 13),
                    ),
                    Text(
                      '2022-07-19 17:00:00',
                      style: StylesUtils.customTextStyle(
                          color: ColorsUtils.colorAaaa, fontSize: 13),
                    ),
                  ],
                ),
              ),
              Container(
                height: 28,
                alignment: Alignment.centerLeft,
                child: Wrap(
                  spacing: 15,
                  children: [
                    Text(
                      '维修用时',
                      style: StylesUtils.customTextStyle(
                          color: ColorsUtils.color3333, fontSize: 13),
                    ),
                    Text(
                      '1小时30分钟',
                      style: StylesUtils.customTextStyle(
                          color: ColorsUtils.colorAaaa, fontSize: 13),
                    ),
                  ],
                ),
              ),
              Container(
                alignment: Alignment.centerLeft,
                child: MaxLineWrap(
                  spacing: 15,
                  maxLine: 3,
                  children: [
                    Text(
                      '维修内容',
                      style: StylesUtils.customTextStyle(
                          color: ColorsUtils.color3333, fontSize: 13),
                    ),
                    Text(
                      '马上就是有钱人了还伺候什么甲方，马上就是有钱人了还伺候什么甲方',
                      strutStyle: const StrutStyle(height: 1.5),
                      style: StylesUtils.customTextStyle(
                          color: ColorsUtils.colorAaaa, fontSize: 13),
                    )
                  ],
                ),
              ),
            ],
          ),
        )
      ],
    );
  }

  List<Widget> steps() {
    return [
      StepLine(
          lineWidth: 0.5,
          lineColor: ColorsUtils.parseColorFromHexString(ColorsUtils.color9999),
          iconWidget: CircleAvatar(
            radius: 25,
            backgroundColor:
                ColorsUtils.parseColorFromHexString(ColorsUtils.color0052),
            child: Stack(
              clipBehavior: Clip.none,
              children: [
                Container(
                  alignment: Alignment.center,
                  child: Text(
                    '凤九',
                    style: StylesUtils.customTextStyle(),
                  ),
                ),
                const Positioned(
                    width: 20,
                    height: 20,
                    right: 0,
                    bottom: 0,
                    child: Icon(
                      AntdIcons.checkCircleFill,
                      color: Colors.green,
                      size: 20,
                    ))
              ],
            ),
          ),
          contentWidget: Container(
            padding: const EdgeInsets.only(left: 40),
            child: ListBody(
              children: [
                SizedBox(
                  height: 50,
                  child: Row(
                    children: [
                      Container(
                        width: 60,
                        alignment: Alignment.center,
                        child: Text(
                          '张晓峰',
                          style: StylesUtils.customTextStyle(
                              color: ColorsUtils.color3333, fontSize: 16),
                        ),
                      ),
                      Container(
                        width: 80,
                        padding: const EdgeInsets.only(left: 10),
                        alignment: Alignment.centerLeft,
                        child: Text(
                          '发起申请',
                          style: StylesUtils.customTextStyle(
                              color: ColorsUtils.color9999),
                        ),
                      ),
                      Container(
                        padding: const EdgeInsets.only(left: 15),
                        child: Text(
                          '2023.01.14 16:34:07',
                          style: StylesUtils.customTextStyle(
                              fontSize: 13, color: ColorsUtils.colorAaaa),
                        ),
                      )
                    ],
                  ),
                ),
                const SizedBox(
                  height: 40,
                )
              ],
            ),
          )),
      StepLine(
          lineWidth: 1,
          lineColor: ColorsUtils.parseColorFromHexString(ColorsUtils.color9999),
          iconWidget: CircleAvatar(
            radius: 25,
            backgroundColor:
                ColorsUtils.parseColorFromHexString(ColorsUtils.color0052),
            child: Stack(
              clipBehavior: Clip.none,
              children: [
                Container(
                  alignment: Alignment.center,
                  child: Text(
                    '小凤',
                    style: StylesUtils.customTextStyle(),
                  ),
                ),
                const Positioned(
                    width: 20,
                    height: 20,
                    right: 0,
                    bottom: 0,
                    child: Icon(
                      AntdIcons.checkCircleFill,
                      color: Colors.green,
                      size: 20,
                    ))
              ],
            ),
          ),
          contentWidget: Container(
            padding: const EdgeInsets.only(left: 40),
            child: ListBody(
              children: [
                SizedBox(
                  height: 50,
                  child: Row(
                    children: [
                      Container(
                        width: 60,
                        alignment: Alignment.center,
                        child: Text(
                          '小凤',
                          style: StylesUtils.customTextStyle(
                              color: ColorsUtils.color3333, fontSize: 16),
                        ),
                      ),
                      Container(
                        width: 80,
                        padding: const EdgeInsets.only(left: 10),
                        alignment: Alignment.centerLeft,
                        child: Text(
                          '通过',
                          style: StylesUtils.customTextStyle(
                              color: ColorsUtils.color0bb2),
                        ),
                      ),
                      Container(
                        padding: const EdgeInsets.only(left: 15),
                        child: Text(
                          '2023.01.15 19:54:52',
                          style: StylesUtils.customTextStyle(
                              fontSize: 13, color: ColorsUtils.colorAaaa),
                        ),
                      )
                    ],
                  ),
                ),
                Container(
                  alignment: Alignment.centerLeft,
                  child: Text(
                    '“分庭抗礼”这个成语常被人误解之处有二，一是它事实上只能用于上对下',
                    style: StylesUtils.customTextStyle(
                        color: ColorsUtils.color9999),
                  ),
                ),
              ],
            ),
          )),
      StepLine(
          lineWidth: 1,
          lineColor: ColorsUtils.parseColorFromHexString(ColorsUtils.color9999),
          iconWidget: CircleAvatar(
            radius: 25,
            backgroundColor:
                ColorsUtils.parseColorFromHexString(ColorsUtils.color0052),
            child: Stack(
              clipBehavior: Clip.none,
              children: [
                Container(
                  alignment: Alignment.center,
                  child: Text(
                    '九歌',
                    style: StylesUtils.customTextStyle(),
                  ),
                ),
                const Positioned(
                    width: 20,
                    height: 20,
                    right: 0,
                    bottom: 0,
                    child: Icon(
                      AntdIcons.checkCircleFill,
                      color: Colors.green,
                      size: 20,
                    ))
              ],
            ),
          ),
          contentWidget: Container(
            padding: const EdgeInsets.only(left: 40),
            child: ListBody(
              children: [
                SizedBox(
                  height: 50,
                  child: Row(
                    children: [
                      Container(
                        width: 60,
                        alignment: Alignment.center,
                        child: Text(
                          '九歌',
                          style: StylesUtils.customTextStyle(
                              color: ColorsUtils.color3333, fontSize: 16),
                        ),
                      ),
                      Container(
                        width: 80,
                        padding: const EdgeInsets.only(left: 10),
                        alignment: Alignment.centerLeft,
                        child: Text(
                          '通过',
                          style: StylesUtils.customTextStyle(
                              color: ColorsUtils.color0bb2),
                        ),
                      ),
                      Container(
                        padding: const EdgeInsets.only(left: 15),
                        child: Text(
                          '2023.01.15 19:54:52',
                          style: StylesUtils.customTextStyle(
                              fontSize: 13, color: ColorsUtils.colorAaaa),
                        ),
                      )
                    ],
                  ),
                ),
                Container(
                  alignment: Alignment.centerLeft,
                  child: Text(
                    '“分庭抗礼”这个成语常被人误解之处有二，一是它事实上只能用于上对下',
                    style: StylesUtils.customTextStyle(
                        color: ColorsUtils.color9999),
                  ),
                ),
              ],
            ),
          )),
      StepLine(
          lineWidth: 1,
          lineColor: Colors.transparent,
          iconWidget: CircleAvatar(
            radius: 25,
            backgroundColor:
                ColorsUtils.parseColorFromHexString(ColorsUtils.color0052),
            child: Stack(
              clipBehavior: Clip.none,
              children: [
                Container(
                  alignment: Alignment.center,
                  child: Text(
                    '阿兰若',
                    style: StylesUtils.customTextStyle(),
                  ),
                ),
                const Positioned(
                    width: 20,
                    height: 20,
                    right: 0,
                    bottom: 0,
                    child: Icon(
                      AntdIcons.checkCircleFill,
                      color: Colors.green,
                      size: 20,
                    ))
              ],
            ),
          ),
          contentWidget: Container(
            padding: const EdgeInsets.only(left: 40),
            child: ListBody(
              children: [
                SizedBox(
                  height: 50,
                  child: Row(
                    children: [
                      Container(
                        width: 60,
                        alignment: Alignment.center,
                        child: Text(
                          '阿兰若',
                          style: StylesUtils.customTextStyle(
                              color: ColorsUtils.color3333, fontSize: 16),
                        ),
                      ),
                      Container(
                        width: 80,
                        padding: const EdgeInsets.only(left: 10),
                        alignment: Alignment.centerLeft,
                        child: Text(
                          '通过',
                          style: StylesUtils.customTextStyle(
                              color: ColorsUtils.color0bb2),
                        ),
                      ),
                      Container(
                        padding: const EdgeInsets.only(left: 15),
                        child: Text(
                          '2023.01.15 19:54:52',
                          style: StylesUtils.customTextStyle(
                              fontSize: 13, color: ColorsUtils.colorAaaa),
                        ),
                      )
                    ],
                  ),
                ),
                Container(
                  alignment: Alignment.centerLeft,
                  child: Text(
                    '“分庭抗礼”这个成语常被人误解之处有二，一是它事实上只能用于上对下',
                    style: StylesUtils.customTextStyle(
                        color: ColorsUtils.color9999),
                  ),
                ),
              ],
            ),
          ))
    ];
  }
}

class _MyCustomPaintLine extends CustomPainter {
  @override
  void paint(Canvas canvas, Size size) {
    /// w = 10, h = 20
    Paint paint = Paint()
      ..isAntiAlias = false
      ..color = ColorsUtils.parseColorFromHexString(ColorsUtils.color0052)
      ..style = PaintingStyle.fill;
    Rect rect = const Rect.fromLTWH(10, 10, 10, 20);
    canvas.drawRect(rect, paint);

    Offset p1 = Offset(0, size.height);
    Offset p2 = Offset(size.width, size.height);

    canvas.drawLine(
        p1,
        p2,
        paint
          ..color = ColorsUtils.parseColorFromHexString(ColorsUtils.colorE4e4));
  }

  @override
  bool shouldRepaint(covariant CustomPainter oldDelegate) {
    return this != oldDelegate;
  }
}
